//
//  PictroctModel.m
//  开心一刻
//
//  Created by 欧阳政 on 16/4/8.
//  Copyright © 2016年 刘洋. All rights reserved.
//

#import "PictroctModel.h"

@implementation PictroctModel
+ (NSMutableArray *)jiexiModel:(NSDictionary *)DIC
{
    NSMutableArray *Array = [NSMutableArray array];
    NSDictionary *Dic1 = DIC[@"data"];
    NSArray *array1 = Dic1[@"data"];
    for (NSDictionary *Dic2 in array1)
    {
        PictroctModel *model = [[PictroctModel alloc] init];
        NSArray *array22 = Dic2[@"comments"];
        if (array22 != nil)
        {
            for (NSDictionary *dic22 in array22)
            {
                [model setValuesForKeysWithDictionary:dic22];
            }
        }
        NSDictionary *dic33 = Dic2[@"group"];
        NSDictionary *dic44 = dic33[@"gifvideo"];
        model.mp4_url = [dic44 objectForKey:@"mp4_url"];
        NSDictionary *dic66 = dic44[@"360p_video"];
        [model setValuesForKeysWithDictionary:dic66];
        NSDictionary *dic55 = dic33[@"user"];
        model.useravatar_url = [dic55 objectForKey: @"avatar_url"];
        model.name = [dic55 objectForKey: @"name"];
//        [model setValuesForKeysWithDictionary:dic55];
        model.category_name = dic33[@"category_name"];
        model.content = dic33[@"content"];
        model.share_url = dic33[@"share_url"];
       
        if (model.mp4_url != nil)
        {
            [Array addObject:model];
//            NSLog(@"avatar_url=======%@",model.avatar_url);
//            NSLog(@"useravatar_url===%@",model.useravatar_url);
        }
    }
    
    return Array;
}
- (void)setValue:(id)value forUndefinedKey:(NSString *)key
{
    
}
@end
